package cate.game.role.bag.heropart;

import cate.common.table.d.GDObj;
import cate.common.table.item.IBagItemTpl;
import cate.game.GameBody;
import cate.game.play.support.PlayBuildContext;
import cate.game.role.Role;
import cate.game.role.bag.item.BaseBagItem;
import com.fasterxml.jackson.annotation.JsonIgnore;

/** 英雄碎片背包里的碎片项 */
public class HeroPart extends BaseBagItem {

    public HeroPart() {}

    public HeroPart(Role role, int tid, long num){
        super(role, GDObj.Type.HERO_PART, tid,num);
    }

    @Override
    @JsonIgnore
    public IBagItemTpl getTpl(PlayBuildContext ctx) {
        return ctx.itemExcel().heroPart.get(tid);
    }

    @Override
    public IBagItemTpl getTpl(GameBody game) {
        return getTpl(game.fight.getPlayBuildContext());
    }
}